package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysDiagnosisRecordMapper;
import com.ruoyi.system.domain.SysDiagnosisRecord;
import com.ruoyi.system.service.ISysDiagnosisRecordService;

/**
 * 诊断结果列Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-06-07
 */
@Service
public class SysDiagnosisRecordServiceImpl implements ISysDiagnosisRecordService 
{
    @Autowired
    private SysDiagnosisRecordMapper sysDiagnosisRecordMapper;

    /**
     * 查询诊断结果列
     * 
     * @param companyId 诊断结果列主键
     * @return 诊断结果列
     */
    @Override
    public SysDiagnosisRecord selectSysDiagnosisRecordByCompanyId(Long companyId)
    {
        return sysDiagnosisRecordMapper.selectSysDiagnosisRecordByCompanyId(companyId);
    }

    /**
     * 查询诊断结果列列表
     * 
     * @param sysDiagnosisRecord 诊断结果列
     * @return 诊断结果列
     */
    @Override
    public List<SysDiagnosisRecord> selectSysDiagnosisRecordList(SysDiagnosisRecord sysDiagnosisRecord)
    {
        return sysDiagnosisRecordMapper.selectSysDiagnosisRecordList(sysDiagnosisRecord);
    }

    /**
     * 新增诊断结果列
     * 
     * @param sysDiagnosisRecord 诊断结果列
     * @return 结果
     */
    @Override
    public int insertSysDiagnosisRecord(SysDiagnosisRecord sysDiagnosisRecord)
    {
        sysDiagnosisRecord.setCreateTime(DateUtils.getNowDate());
        return sysDiagnosisRecordMapper.insertSysDiagnosisRecord(sysDiagnosisRecord);
    }

    /**
     * 修改诊断结果列
     * 
     * @param sysDiagnosisRecord 诊断结果列
     * @return 结果
     */
    @Override
    public int updateSysDiagnosisRecord(SysDiagnosisRecord sysDiagnosisRecord)
    {
        sysDiagnosisRecord.setUpdateTime(DateUtils.getNowDate());
        return sysDiagnosisRecordMapper.updateSysDiagnosisRecord(sysDiagnosisRecord);
    }

    /**
     * 批量删除诊断结果列
     * 
     * @param companyIds 需要删除的诊断结果列主键
     * @return 结果
     */
    @Override
    public int deleteSysDiagnosisRecordByCompanyIds(Long[] companyIds)
    {
        return sysDiagnosisRecordMapper.deleteSysDiagnosisRecordByCompanyIds(companyIds);
    }

    /**
     * 删除诊断结果列信息
     * 
     * @param companyId 诊断结果列主键
     * @return 结果
     */
    @Override
    public int deleteSysDiagnosisRecordByCompanyId(Long companyId)
    {
        return sysDiagnosisRecordMapper.deleteSysDiagnosisRecordByCompanyId(companyId);
    }
}
